﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Mysoft.MyCM.Web.Controllers
{
	public class MHandleExceptionInfo
	{
		/// <summary>
		/// 友好消息
		/// </summary>
		public string Message { get; set; }
		/// <summary>
		/// 关联的异常
		/// </summary>
		public Exception Exception { get; set; }
		/// <summary>
		/// 异常类型
		/// </summary>
		public MHandleExceptionType ExceptionType { get; set; }
		/// <summary>
		/// 发生错误的页面地址
		/// </summary>
		public string WindowLocation { get; set; }
	}

	public enum MHandleExceptionType
	{
		/// <summary>
		/// WebApi异常
		/// </summary>
		InvalidApi = 1,
		/// <summary>
		/// 无效请求
		/// </summary>
		InvalidRequest = 2,
		/// <summary>
		/// 业务错误（已处理但抛出的异常）
		/// </summary>
		Stop = 3,
		/// <summary>
		/// 未处理的异常
		/// </summary>
		Fatal = 4,
		/// <summary>
		/// 未找到
		/// </summary>
		PageNotFound = 99
	}
}